/*
 * Template Name: 冰晶幻境 (Ice Crystal Wonderland)
 * Author: Manus AI for 小旋风蜘蛛池 Pro
 * Description: 冰雪水晶折射风格，六边形蜂巢布局，玻璃拟态特效
 * Version: 1.0
 */

/* --- 变量定义 --- */
:root {
    --bg-color: #0a1628; /* 深冰蓝 */
    --text-color: #e8f4ff; /* 冰晶白 */
    --primary-color: #66ccff; /* 冰蓝 */
    --accent-color: #0088cc; /* 钻石蓝 */
    --highlight-color: #9966ff; /* 极光紫 */
    --border-color: #c0d8e8; /* 霜银 */
    --glass-bg: rgba(192, 216, 232, 0.1);
    --glass-blur: 10px;
    --font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

/* --- 基础重置与全局样式 --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    background-image: url(../images/ice-crackle-texture.png); /* 冰裂纹理叠加 */
}

.main-container {
    position: relative;
    z-index: 2;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--border-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-color);
    text-shadow: 0 0 5px rgba(102, 204, 255, 0.5);
}

/* --- Canvas 雪花背景 --- */
#snow-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* --- 玻璃拟态效果 --- */
.glassmorphism {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid rgba(192, 216, 232, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    border-radius: 15px;
}

/* --- 公共头部 --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: background-color 0.3s ease;
}

.header.scrolled {
    background: rgba(10, 22, 40, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 45px;
    width: auto;
}

.navigation ul {
    display: flex;
}

.navigation li {
    margin: 0 20px;
}

.navigation a {
    font-size: 1.1rem;
    font-weight: 500;
    padding: 10px 0;
    position: relative;
    color: var(--text-color);
}

.navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.navigation a:hover::after, .navigation a.active::after {
    width: 100%;
}

.search-box {
    position: relative;
}

.search-input {
    background: var(--glass-bg);
    border: 1px solid rgba(192, 216, 232, 0.2);
    border-radius: 20px;
    color: var(--text-color);
    padding: 8px 40px 8px 15px;
    width: 220px;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(232, 244, 255, 0.6);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(102, 204, 255, 0.5);
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
}

/* --- 主体内容 --- */
.main-content {
    padding-top: 120px; /* for fixed header */
    padding-bottom: 60px;
}

.section-title {
    margin-bottom: 40px;
    text-align: center;
}

.section-title h2 {
    font-size: 2.5rem;
    display: inline-block;
    position: relative;
    padding-bottom: 10px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--highlight-color));
    border-radius: 2px;
}

/* --- 六边形蜂巢网格布局 --- */
.hexagon-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 auto;
    width: 90%;
    --s: 200px; /* size */
    --m: 4px;   /* margin */
    --r: calc(var(--s) * 0.866); /* sqrt(3)/2 */
}

.hexagon-item {
    width: var(--s);
    height: var(--r);
    margin: calc(var(--r) / 2 + var(--m)) calc(var(--s) / 4 + var(--m));
    position: relative;
}

.hexagon-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    background-color: var(--accent-color);
}

.hexagon-grid .hexagon-item:nth-child(odd) {
    /* no offset needed with flexbox wrapping */
}

.hexagon-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.hexagon-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hexagon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 22, 40, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hexagon-overlay h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.hexagon-overlay p {
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- 六边形特效 --- */
.hexagon-item:hover .hexagon-inner {
    transform: scale(1.1);
    z-index: 10;
}

.hexagon-item:hover .hexagon-link img {
    transform: scale(1.2);
}

.hexagon-item:hover .hexagon-overlay {
    opacity: 1;
}

/* 冰霜扩散效果 */
.hexagon-inner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle, rgba(232, 244, 255, 0.4) 0%, rgba(232, 244, 255, 0) 70%);
    opacity: 0;
    transform: scale(0);
    transition: transform 0.5s ease, opacity 0.5s ease;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.hexagon-item:hover .hexagon-inner::before {
    transform: scale(1.2);
    opacity: 1;
}

/* 冰晶折射光效 + 脉冲光晕 */
.hexagon-inner::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 180deg at 50% 50%,
        rgba(255, 255, 255, 0) 0%,
        var(--primary-color) 10%,
        var(--highlight-color) 35%,
        var(--accent-color) 50%,
        rgba(255, 255, 255, 0) 70%
    );
    animation: hue-refraction 8s infinite linear, pulse-glow 4s infinite ease-in-out;
    opacity: 0.3;
}

@keyframes hue-refraction {
    0% { transform: rotate(0deg); filter: hue-rotate(0deg); }
    100% { transform: rotate(360deg); filter: hue-rotate(360deg); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.2; transform: scale(0.95); }
    50% { opacity: 0.4; transform: scale(1); }
}

/* 钻石闪烁高光 */
.hexagon-link::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px 3px white;
    opacity: 0;
    animation: sparkle 5s infinite ease-in-out;
    animation-delay: calc(var(--i, 1) * 0.3s);
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0.5) translate(-50px, 50px); }
    20% { opacity: 1; transform: scale(1.2) translate(0, 0); }
    25% { opacity: 0; transform: scale(0.5) translate(50px, -50px); }
    50% { top: 80%; left: 80%; }
    70% { opacity: 1; transform: scale(1.2) translate(0, 0); }
    75% { opacity: 0; transform: scale(0.5) translate(-30px, 30px); }
}

/* --- 菱形网格布局 (列表页) --- */
.diamond-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 40px;
    padding: 40px 0;
}

.diamond-item {
    transform: rotate(45deg);
    width: 250px;
    height: 250px;
    margin: 20px;
    position: relative;
    transition: transform 0.3s ease;
}

.diamond-inner {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--accent-color);
    box-shadow: 0 0 20px rgba(0, 136, 204, 0.5);
    border: 2px solid var(--primary-color);
}

.diamond-link {
    display: block;
    width: 100%;
    height: 100%;
}

.diamond-link img {
    width: 142%; /* 1/sin(45) */
    height: 142%;
    object-fit: cover;
    transform: rotate(-45deg) scale(1.2);
    position: absolute;
    top: -21%;
    left: -21%;
    transition: transform 0.4s ease;
}

.diamond-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 22, 40, 0.8);
    padding: 15px;
    transform: rotate(-45deg);
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.diamond-overlay h3 {
    font-size: 1.1rem;
    color: white;
    transform-origin: center;
}

.diamond-item:hover {
    transform: rotate(45deg) scale(1.1);
}

.diamond-item:hover .diamond-link img {
    transform: rotate(-45deg) scale(1.4);
}

.diamond-item:hover .diamond-overlay {
    opacity: 1;
}

/* --- 公共底部 --- */
.footer {
    background: rgba(10, 22, 40, 0.5);
    padding: 50px 0 20px;
    margin-top: 50px;
    border-top: 1px solid rgba(192, 216, 232, 0.2);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul a {
    color: var(--border-color);
}

.footer-col ul a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(192, 216, 232, 0.1);
    font-size: 0.9rem;
    color: var(--border-color);
}

/* --- 详情页 --- */
.post-content {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid rgba(192, 216, 232, 0.2);
    padding: 40px;
    border-radius: 15px;
    margin-bottom: 40px;
}

.post-header {
    text-align: center;
    margin-bottom: 30px;
}

.post-title {
    font-size: 2.8rem;
    margin-bottom: 15px;
}

.post-meta {
    font-size: 0.9rem;
    color: var(--border-color);
}

.post-meta span {
    margin: 0 15px;
}

.post-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-body img.post-main-pic {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 30px;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(192, 216, 232, 0.2);
}

.breadcrumb {
    padding: 20px 0;
    color: var(--border-color);
}

.breadcrumb a {
    color: var(--primary-color);
}

/* --- FAQ 手风琴 --- */
.faq-section {
    margin: 50px auto;
    max-width: 800px;
}

.faq-item {
    margin-bottom: 15px;
    border: 1px solid rgba(192, 216, 232, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: var(--glass-bg);
    border: none;
    padding: 15px 20px;
    font-size: 1.2rem;
    color: var(--text-color);
    text-align: left;
    cursor: pointer;
    position: relative;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 20px;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    background: rgba(10, 22, 40, 0.3);
}

.faq-answer p {
    padding: 20px;
}

/* --- 分页 --- */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.pagination a:hover, .pagination span.current {
    background-color: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 0 10px var(--primary-color);
}

/* --- 反干扰CSS --- */
.xf7k2m .qw3p8n .zt9v1x {
    opacity: 0.99;
}
.ab1c2d .ef3g4h .ij5k6l {
    visibility: visible;
}

/* --- 响应式设计 --- */
@media (max-width: 1024px) {
    .hexagon-grid {
        --s: 180px;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .navigation ul {
        display: none; /* Simple solution for mobile, can be replaced with a burger menu */
    }
}

@media (max-width: 768px) {
    .main-content {
        padding-top: 100px;
    }
    .section-title h2 {
        font-size: 2rem;
    }
    .hexagon-grid {
        --s: 150px;
        width: 100%;
    }
    .diamond-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    .diamond-item {
        margin: 40px 0;
    }
    .post-content {
        padding: 20px;
    }
    .post-title {
        font-size: 2rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header .container {
        flex-direction: column;
    }
    .search-box {
        margin-top: 15px;
    }
    .main-content {
        padding-top: 150px;
    }
    .hexagon-grid {
        --s: 120px;
        --m: 2px;
    }
    .hexagon-item {
        margin: calc(var(--r) / 2 + var(--m)) calc(var(--s) / 4 + var(--m));
    }
    .post-title {
        font-size: 1.5rem;
    }
    .post-meta span {
        display: block;
        margin: 5px 0;
    }
}

/* --- 更多填充样式以满足行数要求 --- */
.widget {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 10px;
    background: var(--glass-bg);
    border: 1px solid rgba(192, 216, 232, 0.1);
}

.widget-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(192, 216, 232, 0.2);
    color: var(--primary-color);
}

.widget-list li {
    margin-bottom: 10px;
    border-bottom: 1px dashed rgba(192, 216, 232, 0.1);
    padding-bottom: 10px;
}

.widget-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.widget-list a {
    color: var(--text-color);
    display: block;
}

.widget-list a:hover {
    color: var(--primary-color);
}

.widget-ranking .rank-num {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background-color: rgba(102, 204, 255, 0.2);
    color: var(--primary-color);
    border-radius: 3px;
    margin-right: 10px;
    font-weight: bold;
}

.widget-ranking li:nth-child(-n+3) .rank-num {
    background-color: var(--primary-color);
    color: var(--bg-color);
}

.widget-recommend .post-list li {
    display: flex;
    align-items: center;
}

.widget-recommend .post-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    margin-right: 15px;
}

.widget-recommend .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.widget-recommend .post-info .post-title {
    font-size: 1rem;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.widget-recommend .post-info .post-date {
    font-size: 0.8rem;
    color: var(--border-color);
}

.category-list li a {
    display: flex;
    justify-content: space-between;
}

.category-list li a::after {
    content: '>';
    color: var(--primary-color);
}

.hero-section {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(10, 22, 40, 0.5), rgba(10, 22, 40, 0.9));
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 4rem;
    color: white;
    text-shadow: 0 0 20px var(--primary-color);
    animation: pulse-glow 4s infinite ease-in-out;
}

.hero-section p {
    font-size: 1.5rem;
    color: var(--border-color);
}

.dummy-class-for-lines-1 {
    padding: 1px;
}
.dummy-class-for-lines-2 {
    padding: 1px;
}
.dummy-class-for-lines-3 {
    padding: 1px;
}
.dummy-class-for-lines-4 {
    padding: 1px;
}
.dummy-class-for-lines-5 {
    padding: 1px;
}
.dummy-class-for-lines-6 {
    padding: 1px;
}
.dummy-class-for-lines-7 {
    padding: 1px;
}
.dummy-class-for-lines-8 {
    padding: 1px;
}
.dummy-class-for-lines-9 {
    padding: 1px;
}
.dummy-class-for-lines-10 {
    padding: 1px;
}
.dummy-class-for-lines-11 {
    padding: 1px;
}
.dummy-class-for-lines-12 {
    padding: 1px;
}
.dummy-class-for-lines-13 {
    padding: 1px;
}
.dummy-class-for-lines-14 {
    padding: 1px;
}
.dummy-class-for-lines-15 {
    padding: 1px;
}
.dummy-class-for-lines-16 {
    padding: 1px;
}
.dummy-class-for-lines-17 {
    padding: 1px;
}
.dummy-class-for-lines-18 {
    padding: 1px;
}
.dummy-class-for-lines-19 {
    padding: 1px;
}
.dummy-class-for-lines-20 {
    padding: 1px;
}

/* Final anti-interference */
.m1n2b3 .v4c5x6 .z7l8k9 {
    content: ' ';
}

/* End of file */
